home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks97 / WarriorsProgress.sit / Warrior’s Progress / source code / Source / Libraries / Views / View.h < prev    next >
Text File  |  1997-06-28  |  1KB  |  60 lines

  1. // View.h
  2.  
  3. #ifndef View_h
  4. #define View_h
  5.  
  6. #ifndef Rectangle_h
  7. #include "Rectangle.h"
  8. #endif
  9. #ifndef Sizeable_h
  10. #include "Sizeable.h"
  11. #endif
  12. #ifndef ContextUser_h
  13. #include "ContextUser.h"
  14. #endif
  15.  
  16. class RegionObject;
  17. class TangibleView;
  18. class ViewMap;
  19.  
  20. class View: public Sizeable,
  21.                 public ContextUser
  22.   {
  23.     friend class Pane;
  24.     
  25.     private:
  26.         Pane *owner;
  27.     
  28.     protected:
  29.         virtual void GainMapping();
  30.         virtual void LoseMapping();
  31.         virtual void ChangeBounds( Rectangle oldBounds );
  32.     
  33.     public:
  34.         View();
  35.         ~View();
  36.         
  37.         bool HasOwner() const            { return owner != 0; }
  38.         const Pane& Owner() const        { Assert( owner != 0 ); return *owner; }
  39.         
  40.         bool Mapped() const;
  41.         void Clip( RegionObject& ) const;
  42.         
  43.         void Update() const;
  44.         void Update( const Rectangle& ) const;
  45.         void Update( const RegionObject& ) const;
  46.         
  47.         void Redraw() const;
  48.         void Redraw( const Rectangle& ) const;
  49.         void Redraw( const RegionObject& ) const;
  50.         
  51.         void Invalidate() const;
  52.         void Invalidate( const Rectangle& ) const;
  53.         void Invalidate( const RegionObject& ) const;
  54.         
  55.         virtual void Draw( const ViewMap& ) const = 0;
  56.         virtual TangibleView *Touch( PointObject );
  57.   };
  58.  
  59. #endif
  60.